﻿
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;

using System.Windows.Shapes;
using Sqo;

namespace Ivvy_Silverlight
{


    /// [Generated Feb  9 2011]

    public partial class i_vw_Appointment_Detail : ISqoDataObject
    {

        #region "private fields"

        private Int64 _vw_Appointment_Detail_ID;
        private int _CalendarItem_ID;
        private string _Salutation;
        private string _FirstName;
        private string _MiddleName;
        private string _LastName;
        private int _CalendarItem_Calendar_ID;
        private int _Entry_ID;
        private int _Field_ID;
        private string _Field;
        private string _Value;
        private int _Verb_ID;
        private string _Verb;
        private string _Entry;
        private string _StatusNote;
        private DateTime _Start_Date;
        private DateTime _End_Date;
        private int _Status_ID;

        #endregion

        #region "public properties"

        public Int64 vw_Appointment_Detail_ID
        {
            get { return _vw_Appointment_Detail_ID; }
            set { _vw_Appointment_Detail_ID = value; }
        }
        public int CalendarItem_ID
        {
            get { return _CalendarItem_ID; }
            set { _CalendarItem_ID = value; }
        }
        public string Salutation
        {
            get { return _Salutation; }
            set { _Salutation = value; }
        }
        public string FirstName
        {
            get { return _FirstName; }
            set { _FirstName = value; }
        }
        public string MiddleName
        {
            get { return _MiddleName; }
            set { _MiddleName = value; }
        }
        public string LastName
        {
            get { return _LastName; }
            set { _LastName = value; }
        }
        public int CalendarItem_Calendar_ID
        {
            get { return _CalendarItem_Calendar_ID; }
            set { _CalendarItem_Calendar_ID = value; }
        }
        public int Entry_ID
        {
            get { return _Entry_ID; }
            set { _Entry_ID = value; }
        }
        public int Field_ID
        {
            get { return _Field_ID; }
            set { _Field_ID = value; }
        }
        public string Field
        {
            get { return _Field; }
            set { _Field = value; }
        }
        public string Value
        {
            get { return _Value; }
            set { _Value = value; }
        }
        public int Verb_ID
        {
            get { return _Verb_ID; }
            set { _Verb_ID = value; }
        }
        public string Verb
        {
            get { return _Verb; }
            set { _Verb = value; }
        }
        public string Entry
        {
            get { return _Entry; }
            set { _Entry = value; }
        }
        public string StatusNote
        {
            get { return _StatusNote; }
            set { _StatusNote = value; }
        }
        public DateTime Start_Date
        {
            get { return _Start_Date; }
            set { _Start_Date = value; }
        }
        public DateTime End_Date
        {
            get { return _End_Date; }
            set { _End_Date = value; }
        }
        public int Status_ID
        {
            get { return _Status_ID; }
            set { _Status_ID = value; }
        }

        #endregion

        #region "ISqoDataObject"
        object ISqoDataObject.GetValue(System.Reflection.FieldInfo field) { return field.GetValue(this); }
        void ISqoDataObject.SetValue(System.Reflection.FieldInfo field, object value) { field.SetValue(this, value); }

        public int OID { get; set; }
        #endregion


        #region "MAPPER"
        public static Ivvy_Silverlight.i_vw_Appointment_Detail Convert(i7SR.vw_Appointment_Detail od_vw_Appointment_Detail)
        {
            return new Ivvy_Silverlight.i_vw_Appointment_Detail()
            {

                vw_Appointment_Detail_ID = Utils.IsNull(od_vw_Appointment_Detail.vw_Appointment_Detail_ID),
                CalendarItem_ID = Utils.IsNull(od_vw_Appointment_Detail.CalendarItem_ID),
                Salutation = Utils.IsNull(od_vw_Appointment_Detail.Salutation),
                FirstName = Utils.IsNull(od_vw_Appointment_Detail.FirstName),
                MiddleName = Utils.IsNull(od_vw_Appointment_Detail.MiddleName),
                LastName = Utils.IsNull(od_vw_Appointment_Detail.LastName),
                CalendarItem_Calendar_ID = Utils.IsNull(od_vw_Appointment_Detail.CalendarItem_Calendar_ID),
                Entry_ID = Utils.IsNull(od_vw_Appointment_Detail.Entry_ID),
                Field_ID = Utils.IsNull(od_vw_Appointment_Detail.Field_ID),
                Field = Utils.IsNull(od_vw_Appointment_Detail.Field),
                Value = Utils.IsNull(od_vw_Appointment_Detail.Value),
                Verb_ID = Utils.IsNull(od_vw_Appointment_Detail.Verb_ID),
                Verb = Utils.IsNull(od_vw_Appointment_Detail.Verb),
                Entry = Utils.IsNull(od_vw_Appointment_Detail.Entry),
                StatusNote = Utils.IsNull(od_vw_Appointment_Detail.StatusNote),
                Start_Date = Utils.IsNull(od_vw_Appointment_Detail.Start_Date),
                End_Date = Utils.IsNull(od_vw_Appointment_Detail.End_Date),
                Status_ID = Utils.IsNull(od_vw_Appointment_Detail.Status_ID),

            };
        }
        #endregion


        #region "REVERSEMAPPER"
        public static Ivvy_Silverlight.i7SR.vw_Appointment_Detail ReverseConvert(i_vw_Appointment_Detail od_vw_Appointment_Detail)
        {
            return new Ivvy_Silverlight.i7SR.vw_Appointment_Detail()
            {
                vw_Appointment_Detail_ID = Utils.ReverseIsNull(od_vw_Appointment_Detail.vw_Appointment_Detail_ID).Value,
                CalendarItem_ID = Utils.ReverseIsNull(od_vw_Appointment_Detail.CalendarItem_ID).Value,
                Salutation = Utils.ReverseIsNull(od_vw_Appointment_Detail.Salutation),
                FirstName = Utils.ReverseIsNull(od_vw_Appointment_Detail.FirstName),
                MiddleName = Utils.ReverseIsNull(od_vw_Appointment_Detail.MiddleName),
                LastName = Utils.ReverseIsNull(od_vw_Appointment_Detail.LastName),
                CalendarItem_Calendar_ID = Utils.ReverseIsNull(od_vw_Appointment_Detail.CalendarItem_Calendar_ID),
                Entry_ID = Utils.ReverseIsNull(od_vw_Appointment_Detail.Entry_ID),
                Field_ID = Utils.ReverseIsNull(od_vw_Appointment_Detail.Field_ID),
                Field = Utils.ReverseIsNull(od_vw_Appointment_Detail.Field),
                Value = Utils.ReverseIsNull(od_vw_Appointment_Detail.Value),
                Verb_ID = Utils.ReverseIsNull(od_vw_Appointment_Detail.Verb_ID),
                Verb = Utils.ReverseIsNull(od_vw_Appointment_Detail.Verb),
                Entry = Utils.ReverseIsNull(od_vw_Appointment_Detail.Entry),
                StatusNote = Utils.ReverseIsNull(od_vw_Appointment_Detail.StatusNote),
                Start_Date = Utils.ReverseIsNull(od_vw_Appointment_Detail.Start_Date),
                End_Date = Utils.ReverseIsNull(od_vw_Appointment_Detail.End_Date),
                Status_ID = Utils.ReverseIsNull(od_vw_Appointment_Detail.Status_ID),

            };
        }
        #endregion
    }
}

